// 通过从 中选择一组属性Keys（字符串文字或字符串文字的并集）来构造类型Type。
// Pick<Type, Keys>

interface Todo {
    title: string;
    description: string;
    completed: boolean;
  }
   
//   t
  type TodoPreview = Pick<Todo, "title" | "completed">;
   
  const todo: TodoPreview = {
    title: "Clean room",
    completed: false,
  };

  type pick<T,K extends keyof T> = {
      [P in K] : T[P]
  }
   